package com.hncc.kumao.biz.impl;
import java.util.List;

import com.hncc.kumao.biz.IBreakpointUploadTaskBiz;
import com.hncc.kumao.dao.IBreakpointUploadTaskDao;
import com.hncc.kumao.entity.BreakpointUploadTask;
import com.hncc.kumao.entity.OfflineDownloadTask;
/**
 * 业务逻辑类
 * @author chen
 *
 */
public class BreakpointUploadTaskBiz implements IBreakpointUploadTaskBiz {

	private IBreakpointUploadTaskDao breakpointUploadTaskDao;
	public void setBreakpointUploadTaskDao(IBreakpointUploadTaskDao breakpointUploadTaskDao) {
		this.breakpointUploadTaskDao = breakpointUploadTaskDao;
	}
	
    //添加
    public String add(BreakpointUploadTask breakpointUploadTask) {
        return breakpointUploadTaskDao.add(breakpointUploadTask);
    }
    //根据id获取
    public BreakpointUploadTask get(String taskId) {
        return breakpointUploadTaskDao.get(taskId);
    }
    //更新
    public void update(BreakpointUploadTask breakpointUploadTask) {
        breakpointUploadTaskDao.update(breakpointUploadTask);
    }
    
    /**
     * 获取任务列表
     */
    public List<BreakpointUploadTask> getList(BreakpointUploadTask task1, BreakpointUploadTask task2, Object param) {
        List<BreakpointUploadTask> list = breakpointUploadTaskDao.getList(task1, task2, param);
        return list;
    }
    
    /**
     * 分页查询任务列表
     */
    public List<BreakpointUploadTask> getListByPage(BreakpointUploadTask task1, BreakpointUploadTask task2, Object param, int firstResult, int maxResults) {
        List<BreakpointUploadTask> list = breakpointUploadTaskDao.getListByPage(task1, task2, param, firstResult, maxResults);
        return list;
    }
    
    /**
     * 统计记录个数
     */
    public long getCount(BreakpointUploadTask task1, BreakpointUploadTask task2, Object param) {
        return breakpointUploadTaskDao.getCount(task1, task2, param);
    }
    
    /**
     * 统计任务状态
     */
    public List getTaskStateInfo() {
        return breakpointUploadTaskDao.getTaskStateInfo();
    }
}
